home *** CD-ROM | disk | FTP | other *** search
/ Hyper Stacks 1994 May / Hyper Stacks (Pacific HiTech)(1994)[Mac].iso / Utilities / List Randomizer 2.1 / card_3716.txt < prev    next >
Encoding:
Text File  |  1994-04-30  |  8.6 KB  |  389 lines

  1. -- card: 3716 from stack: in.1
  2. -- bmap block id: 4367
  3. -- flags: 0000
  4. -- background id: 4025
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (field)
  9. -- low flags: 00
  10. -- high flags: 0007
  11. -- rect: left=14 top=38 right=335 bottom=360
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 0
  15. -- font id: 3
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: TheList
  20.  
  21.  
  22. -- part 2 (button)
  23. -- low flags: 00
  24. -- high flags: A003
  25. -- rect: left=368 top=41 right=68 bottom=482
  26. -- title width / last selected line: 0
  27. -- icon id / first selected line: 0 / 0
  28. -- text alignment: 1
  29. -- font id: 0
  30. -- text size: 12
  31. -- style flags: 0
  32. -- line height: 16
  33. -- part name: New List
  34. ----- HyperTalk script -----
  35. --
  36. --  Script of cd button "New List" in stack "List Randomizer"
  37. --
  38. --  Written by Jack W. Richens, Jr.
  39. --             Richens Consulting
  40. --             P.O. Box 1853
  41. --             Columbia, MO  65205
  42. --             (314) 445-8042
  43. --
  44. --  Copyright 1991, Richens Consulting, Columbia, Missouri
  45. --
  46. --  This script sets up for a new list.  It allows user to save
  47. --     previous list if they desire.
  48. --
  49. on mouseUp
  50.   global uL,fName,status
  51.   --
  52.   --  Is there anything to save?
  53.   --
  54.   if cd fld "TheList" is not empty then
  55.     answer "Save current list?"  with "No" or "Yes"
  56.     if it is "Yes" then do saveFile
  57.   end if
  58.   --
  59.   --  This button will clear the bkgnd field "TheList"
  60.   --
  61.   put empty into cd fld "TheList"
  62.   put empty into fName
  63.   put "N" into status
  64.  
  65.   type tab
  66. end mouseUp
  67.  
  68.  
  69.  
  70. -- part 3 (button)
  71. -- low flags: 00
  72. -- high flags: A003
  73. -- rect: left=368 top=73 right=100 bottom=482
  74. -- title width / last selected line: 0
  75. -- icon id / first selected line: 0 / 0
  76. -- text alignment: 1
  77. -- font id: 0
  78. -- text size: 12
  79. -- style flags: 0
  80. -- line height: 16
  81. -- part name: Open List...
  82. ----- HyperTalk script -----
  83. --
  84. --  Script of cd button "Open list..." in stack "List Randomizer"
  85. --
  86. --  Written by Jack W. Richens, Jr.
  87. --             Richens Consulting
  88. --             P.O. Box 1853
  89. --             Columbia, MO  65205
  90. --             (314) 445-8042
  91. --
  92. --  Copyright 1991, Richens Consulting, Columbia, Missouri
  93. --
  94. --  This script reads in a list from a file.  It first allows
  95. --       user to save current list.
  96. --
  97. on mouseUp
  98.   --
  99.   --  This button will read the contents of a text file into
  100.   --  the card field "TheList"
  101.   --
  102.   if cd fld "TheList" is not empty then
  103.     answer "Save current list?" with "No" or "Yes"
  104.     if it is "Yes" then do saveFile
  105.     put empty into cd field "TheList"
  106.   end if
  107.  
  108.   readFile
  109.  
  110. end mouseUp
  111.  
  112.  
  113.  
  114. -- part 8 (button)
  115. -- low flags: 00
  116. -- high flags: A003
  117. -- rect: left=368 top=104 right=131 bottom=482
  118. -- title width / last selected line: 0
  119. -- icon id / first selected line: 0 / 0
  120. -- text alignment: 1
  121. -- font id: 0
  122. -- text size: 12
  123. -- style flags: 0
  124. -- line height: 16
  125. -- part name: Save List...
  126. ----- HyperTalk script -----
  127. --
  128. --  Script of cd button "Save List..." in stack "List Randomizer"
  129. --
  130. --  Written by Jack W. Richens, Jr.
  131. --             Richens Consulting
  132. --             P.O. Box 1853
  133. --             Columbia, MO  65205
  134. --             (314) 445-8042
  135. --
  136. --  Copyright 1991, Richens Consulting, Columbia, Missouri
  137. --
  138. --  This script saves an existing list, creating a new file
  139. --       if necessary
  140. on mouseUp
  141.   global uL,fName,status
  142.   --
  143.   saveFile
  144.  
  145. end mouseUp
  146.  
  147.  
  148.  
  149. -- part 4 (button)
  150. -- low flags: 00
  151. -- high flags: A003
  152. -- rect: left=368 top=135 right=162 bottom=482
  153. -- title width / last selected line: 0
  154. -- icon id / first selected line: 0 / 0
  155. -- text alignment: 1
  156. -- font id: 0
  157. -- text size: 12
  158. -- style flags: 0
  159. -- line height: 16
  160. -- part name: Print List...
  161. ----- HyperTalk script -----
  162. --
  163. --  Script of cd button "Print List..." in stack "List Randomizer"
  164. --
  165. --  Written by Jack W. Richens, Jr.
  166. --             Richens Consulting
  167. --             P.O. Box 1853
  168. --             Columbia, MO  65205
  169. --             (314) 445-8042
  170. --
  171. --  Copyright 1991, Richens Consulting, Columbia, Missouri
  172. --
  173. --  This script prints the field "TheList"
  174. --
  175. on mouseUp
  176.   --
  177.   print cd fld "TheList"
  178.  
  179. end mouseUp
  180.  
  181.  
  182.  
  183. -- part 5 (button)
  184. -- low flags: 00
  185. -- high flags: A003
  186. -- rect: left=368 top=180 right=207 bottom=482
  187. -- title width / last selected line: 0
  188. -- icon id / first selected line: 0 / 0
  189. -- text alignment: 1
  190. -- font id: 0
  191. -- text size: 12
  192. -- style flags: 0
  193. -- line height: 16
  194. -- part name: Sort
  195. ----- HyperTalk script -----
  196. --
  197. --  Script of cd button "Sort" in stack "List Randomizer"
  198. --
  199. --  Written by Jack W. Richens, Jr.
  200. --             Richens Consulting
  201. --             P.O. Box 1853
  202. --             Columbia, MO  65205
  203. --             (314) 445-8042
  204. --
  205. --  Copyright 1991, Richens Consulting, Columbia, Missouri
  206. --
  207. --  This script sorts the list into alphabetical order.
  208. --
  209. on mouseUp
  210.   --
  211.   Sort cd fld "TheList"
  212. end mouseUp
  213.  
  214.  
  215.  
  216. -- part 6 (button)
  217. -- low flags: 00
  218. -- high flags: A003
  219. -- rect: left=368 top=212 right=239 bottom=482
  220. -- title width / last selected line: 0
  221. -- icon id / first selected line: 0 / 0
  222. -- text alignment: 1
  223. -- font id: 0
  224. -- text size: 12
  225. -- style flags: 0
  226. -- line height: 16
  227. -- part name: Randomize
  228. ----- HyperTalk script -----
  229. --
  230. --  Script of cd button "Randomize" in stack "List Randomizer"
  231. --
  232. --  Written by Jack W. Richens, Jr.
  233. --             Richens Consulting
  234. --             P.O. Box 1853
  235. --             Columbia, MO  65205
  236. --             (314) 445-8042
  237. --
  238. --  Copyright 1991, Richens Consulting, Columbia, Missouri
  239. --
  240. --  This script randomizes the list
  241. --
  242. on mouseUp
  243.   --
  244.   lock screen
  245.   put number of lines in cd fld "TheList" into nLines
  246.   put cd fld "TheList" into tempList
  247.   put empty into cd fld "TheList"
  248.   --
  249.   repeat until nLines is 0
  250.     put the random of nLines into lNumber
  251.     put line lNumber of tempList & return after cd fld "TheList"
  252.     delete line lNumber of tempList
  253.     subtract 1 from nlines
  254.   end repeat
  255.  
  256.   unlock screen
  257. end mouseUp
  258.  
  259.  
  260.  
  261. -- part 7 (button)
  262. -- low flags: 00
  263. -- high flags: 2002
  264. -- rect: left=432 top=292 right=336 bottom=482
  265. -- title width / last selected line: 0
  266. -- icon id / first selected line: 1006 / 1006
  267. -- text alignment: 1
  268. -- font id: 0
  269. -- text size: 12
  270. -- style flags: 0
  271. -- line height: 16
  272. -- part name: Finder
  273. ----- HyperTalk script -----
  274. --
  275. --  Script of cd button "Finder" in stack "List Randomizer"
  276. --
  277. --  Written by Jack W. Richens, Jr.
  278. --             Richens Consulting
  279. --             P.O. Box 1853
  280. --             Columbia, MO  65205
  281. --             (314) 445-8042
  282. --
  283. --  Copyright 1991, Richens Consulting, Columbia, Missouri
  284. --
  285. --  This script returns you to the Finder
  286. --
  287. on mouseUp
  288.   Beep
  289.   answer "Returning to Finder..." with "Cancel" or "OK"
  290.   if it is "OK" then doMenu "Quit HyperCard"
  291. end mouseUp
  292.  
  293.  
  294.  
  295. -- part 9 (button)
  296. -- low flags: 00
  297. -- high flags: 2002
  298. -- rect: left=369 top=292 right=336 bottom=419
  299. -- title width / last selected line: 0
  300. -- icon id / first selected line: 20098 / 20098
  301. -- text alignment: 1
  302. -- font id: 0
  303. -- text size: 12
  304. -- style flags: 0
  305. -- line height: 16
  306. -- part name: Home
  307. ----- HyperTalk script -----
  308. --
  309. --  Script of cd button "Home" in stack "List Randomizer"
  310. --
  311. --  Written by Jack W. Richens, Jr.
  312. --             Richens Consulting
  313. --             P.O. Box 1853
  314. --             Columbia, MO  65205
  315. --             (314) 445-8042
  316. --
  317. --  Copyright 1991, Richens Consulting, Columbia, Missouri
  318. --
  319. --  This script returns you to the Home stack
  320. --
  321. on mouseUp
  322.   Beep
  323.   answer "Returning to Home Stack..." with "Cancel" or "OK"
  324.   if it is "OK" then go to stack "Home"
  325. end mouseUp
  326.  
  327.  
  328.  
  329. -- part 10 (button)
  330. -- low flags: 00
  331. -- high flags: 2002
  332. -- rect: left=369 top=243 right=287 bottom=419
  333. -- title width / last selected line: 0
  334. -- icon id / first selected line: 2478 / 2478
  335. -- text alignment: 1
  336. -- font id: 0
  337. -- text size: 12
  338. -- style flags: 0
  339. -- line height: 16
  340. -- part name: About
  341. ----- HyperTalk script -----
  342. --
  343. --  Script of button ‚ÄúAbout‚Äù in stack "List Randomizer"
  344. --
  345. --  Written by Jack W. Richens, Jr.
  346. --             Richens Consulting
  347. --             P.O. Box 1853
  348. --             Columbia, MO  65205
  349. --             (314) 445-8042
  350. --
  351. --  Copyright 1991, Richens Consulting, Columbia, Missouri
  352. --
  353. --
  354. on mouseUp
  355.   go to card "About"
  356. end mouseUp
  357.  
  358.  
  359.  
  360. -- part 11 (button)
  361. -- low flags: 00
  362. -- high flags: 2002
  363. -- rect: left=432 top=243 right=287 bottom=482
  364. -- title width / last selected line: 0
  365. -- icon id / first selected line: 25002 / 25002
  366. -- text alignment: 1
  367. -- font id: 0
  368. -- text size: 12
  369. -- style flags: 0
  370. -- line height: 16
  371. -- part name: Help
  372. ----- HyperTalk script -----
  373. --
  374. --  Script of button ‚ÄúHelp‚Äù in stack "List Randomizer"
  375. --
  376. --  Written by Jack W. Richens, Jr.
  377. --             Richens Consulting
  378. --             P.O. Box 1853
  379. --             Columbia, MO  65205
  380. --             (314) 445-8042
  381. --
  382. --  Copyright 1991, Richens Consulting, Columbia, Missouri
  383. --
  384. --
  385. on mouseUp
  386.   go to card "Help"
  387. end mouseUp
  388.  
  389.